import java.io.File;

public class filedemo {
    public static void main(String[] args) {
        System.out.println("=====");

//        File file = new File("02Java-next/fileDemo/src/main/java/test.txt");
//        File file = new File("02Java-next/fileDemo/src/main/java/test.txt");


        //形式1
        File file = new File("F:\\000java_document\\02Java-next\\fileDemo\\src\\main\\java\\test.txt");
        //形式2
        //File file = new File("E:/code/java_document/02Java-next/fileDemo/src/main/java/test.txt");
        long size = file.length();
        System.out.println(size);

//
        System.out.println("文件名称："+file.getName());
        System.out.println("路径分隔符："+file.pathSeparator);
        System.out.println("与系统相关路径分隔符："+file.pathSeparatorChar);
        System.out.println("返回此抽象路径名的绝对形式："+file.getAbsoluteFile());
        System.out.println("是文件么？"+file.isFile());
        System.out.println("是文件夹么："+file.isDirectory());
    }
}
